package cn.wolfcode.business.mapper;


import cn.wolfcode.business.domain.BusAppointment;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.Date;
import java.util.List;

@Mapper
public interface BusAppointmentMapper {

    /**
     * 查询预约信息列表
     *
     * @param busAppointment
     * @return 预约信息列表
     */
    public List<BusAppointment> selectBusAppointmentList(BusAppointment busAppointment);

    /**
     * 根据ID查询预约信息
     *
     * @param id
     * @return 预约信息
     */
    BusAppointment selectBusAppointmentById(Long id);

    /**
     * 添加预约信息
     *
     * @param busAppointment
     * @return 添加结果
     */
    public int insertBusAppointment(BusAppointment busAppointment);

    /**
     * 修改预约信息
     *
     * @param busAppointment
     * @return 修改结果
     */
    public int updateBusAppointment(BusAppointment busAppointment);

    /**
     * 删除预约信息
     *
     * @param ids
     * @return 删除结果
     */

    public int deleteBusAppointmentByIds(Long[] ids);

    int changeStatusById(@Param("status") Integer statusUserCancelled, @Param("id") Long id);

    int changeStatusAndArrivalTimeById(@Param("date") Date date, @Param("status") Integer statusArrived, @Param("id") Long id);
}
